# $Id: choices.py 7557b5d4d82b 2012/12/02 09:07:16 pgurumur $
# Copyright (c) 2009 Prabhu Gurumurthy  <pgurumur@gmail.com>
# 
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#

__version__ = "$Revision: 7557b5d4d82b $"
__author__ = "$Author: pgurumur $"

ROUTEMAP_CHOICES = (
      ('permit', 'Permit directive'),
      ('deny', 'Deny directive'),
      )

BOOLEAN_CHOICES = (
      (0, 'No'),
      (1, 'Yes'),
      )

USERPROFILE_CHOICES = (
      ('Administrator', 'admin'),
      ('Operator', 'operator'),
      ('User', 'user'),
      ('Contractor', 'contractor'),
      )

WHOIS_SERVERS = (
      ('none', 'None'),
      ('whois.arin.net', 'ARIN'),
      ('whois.ripe.net', 'RIPE'),
      ('whois.apnic.net', 'APNIC'),
      ('whois.afrinic.net', 'AFRNIC'),
      ('whois.lacnic.net', 'LACNIC'),
      ('whois.radb.net', 'RADB'),
      )

DH_CHOICES = (
      ('none', 0),
      ('group1', 'modp768'),
      ('group2', 'modp1024'),
      ('group5', 'modp1536'),
      ('group14', 'modp2048'),
      ('group15', 'modp3072'),
      ('group16', 'modp4096'),
      ('group17', 'modp6144'),
      ('group18', 'modp8192'),
      )

CIPHER_CHOICES = (
      ('null', 'none'),
      ('des', 'DES'),
      ('3des', 'Triple DES'),
      ('aes', 'AES 128'),
      ('aes-192', 'AES 192'),
      ('aes-256', 'AES 256'),
      ('aesctr', 'AES CTR'),
      ('blowfish', 'BLOWFISH'),
      ('cast', 'CAST'),
      ('skipjack', 'SKIPJACK'),
      )

AUTH_CHOICES = (
      ('md5', 'MD5'),
      ('ripemd160', 'RIPEMD'),
      ('sha1', 'SHA'),
      ('sha2-256', 'SHA 256'),
      ('sha2-384', 'SHA 384'),
      ('sha2-512', 'SHA 512'),
      )

MM_AUTH_CHOICES = (
      ('passphrase', 'PSK'),
      ('pubkey', 'Public Key'),
      ('certs', 'X509 Certificates'),
      ('keynote', 'Keynote Authentication'),
      )

PROTOCOL_CHOICES = (
   ('ip', 'IP'),
   ('icmp', 'ICMP'),
   ('igmp', 'IGMP'),
   ('ggp', 'GGP'),
   ('ipencap', 'IP-ENCAP'),
   ('st', 'ST'),
   ('tcp', 'TCP'),
   ('ucl', 'UCL'),
   ('egp', 'EGP'),
   ('igp', 'IGP'),
   ('bbn-rcc-mon', 'BBN-RCC-MON'),
   ('nvp-ii', 'NVP-II'),
   ('pup', 'PUP'),
   ('argus', 'ARGUS'),
   ('emcon', 'EMCON'),
   ('xnet', 'XNET'),
   ('chaos', 'CHAOS'),
   ('udp', 'UDP'),
   ('mux', 'MUX'),
   ('dcn-meas', 'DCN-MEAS'),
   ('hmp', 'HMP'),
   ('prm', 'PRM'),
   ('xns-idp', 'XNS-IDP'),
   ('trunk-1', 'TRUNK-1'),
   ('trunk-2', 'TRUNK-2'),
   ('leaf-1', 'LEAF-1'),
   ('leaf-2', 'LEAF-2'),
   ('rdp', 'RDP'),
   ('irtp', 'IRTP'),
   ('iso-tp4', 'ISO-TP4'),
   ('netblt', 'NETBLT'),
   ('mfe-nsp', 'MFE-NSP'),
   ('merit-inp', 'MERIT-INP'),
   ('sep', 'SEP'),
   ('3pc', '3PC'),
   ('idpr', 'IDPR'),
   ('xtp', 'XTP'),
   ('ddp', 'DDP'),
   ('idpr-cmtp', 'IDPR-CMTP'),
   ('tp++', 'TP++'),
   ('il', 'IL'),
   ('ipv6', 'IPv6'),
   ('sdrp', 'SDRP'),
   ('sip-sr', 'SIP-SR'),
   ('sip-frag', 'SIP-FRAG'),
   ('idrp', 'IDRP'),
   ('rsvp', 'RSVP'),
   ('gre', 'GRE'),
   ('mhrp', 'MHRP'),
   ('bna', 'BNA'),
   ('esp', 'IPSEC-ESP'),
   ('ah', 'IPSEC-AH'),
   ('i-nlsp', 'I-NLSP'),
   ('swipe', 'SWIPE'),
   ('nhrp', 'NHRP'),
   ('mobileip', 'MOBILEIP'),
   ('skip', 'SKIP'),
   ('ipv6-icmp', 'IPv6-ICMP'),
   ('ipv6-nonxt', 'IPv6-NoNxt'),
   ('ipv6-opts', 'IPv6-Opts'),
   ('any', 'any'),
   ('cftp', 'CFTP'),
   ('any', 'any'),
   ('sat-expak', 'SAT-EXPAK'),
   ('kryptolan', 'KRYPTOLAN'),
   ('rvd', 'RVD'),
   ('ippc', 'IPPC'),
   ('any', 'any'),
   ('sat-mon', 'SAT-MON'),
   ('visa', 'VISA'),
   ('ipcv', 'IPCV'),
   ('cpnx', 'CPNX'),
   ('cphb', 'CPHB'),
   ('wsn', 'WSN'),
   ('pvp', 'PVP'),
   ('br-sat-mon', 'BR-SAT-MON'),
   ('sun-nd', 'SUN-ND'),
   ('wb-mon', 'WB-MON'),
   ('wb-expak', 'WB-EXPAK'),
   ('iso-ip', 'ISO-IP'),
   ('vmtp', 'VMTP'),
   ('secure-vmtp', 'SECURE-VMTP'),
   ('vines', 'VINES'),
   ('ttp', 'TTP'),
   ('nsfnet-igp', 'NSFNET-IGP'),
   ('dgp', 'DGP'),
   ('tcf', 'TCF'),
   ('igrp', 'IGRP'),
   ('ospf', 'OSPFIGP'),
   ('sprite-rpc', 'Sprite-RPC'),
   ('larp', 'LARP'),
   ('mtp', 'MTP'),
   ('ax.25', 'AX.25'),
   ('ipip', 'IPIP'),
   ('micp', 'MICP'),
   ('scc-sp', 'SCC-SP'),
   ('etherip', 'ETHERIP'),
   ('encap', 'ENCAP'),
   ('any', 'any'),
   ('gmtp', 'GMTP'),
   ('ifmp', 'IFMP'),
   ('pnni', 'PNNI'),
   ('pim', 'PIM'),
   ('aris', 'ARIS'),
   ('scps', 'SCPS'),
   ('qnx', 'QNX'),
   ('a/n', 'A/N'),
   ('ipcomp', 'IPComp'),
   ('snp', 'SNP'),
   ('compaq-peer', 'Compaq-Peer'),
   ('ipx-in-ip', 'IPX-in-IP'),
   ('carp', 'CARP'),
   ('pgm', 'PGM'),
   ('l2tp', 'L2TP'),
   ('ddx', 'DDX'),
   ('iatp', 'IATP'),
   ('stp', 'STP'),
   ('srp', 'SRP'),
   ('uti', 'UTI'),
   ('smp', 'SMP'),
   ('sm', 'SM'),
   ('ptp', 'PTP'),
   ('isis', 'ISIS'),
   ('fire', 'FIRE'),
   ('crtp', 'CRTP'),
   ('crudp', 'CRUDP'),
   ('sscopmce', 'SSCOPMCE'),
   ('iplt', 'IPLT'),
   ('sps', 'SPS'),
   ('pipe', 'PIPE'),
   ('sctp', 'SCTP'),
   ('fc', 'FC'),
   ('rsvp-e2e-ignore', 'RSVP-E2E-IGNORE'),
   ('pfsync', 'PFSYNC'),
   ('reserved', 'Reserved'),
   )

RULE_ACTIONS = (
      ('permit', 'Allow traffic'),
      ('deny', 'Deny traffic'),
      )

ADDR_FAMILY = (
      ('v4', 'IPv4'),
      ('v6', 'IPv6'),
      )

ACL_DIRECTION = (
      ('in', 'Into the interface'),
      ('out', 'Out from the interface')
      )

LOGIN_METHODS = (
      ('telnet', 'Telnet'),
      ('ssh', 'SSH'),
      )

IGP_PROTOCOLS = (
      ('isis', 'ISIS'),
      ('ospf', 'OSPF'),
      ('ripv1', 'RIP v1'),
      ('ripv2', 'RIP v2'),
      ('eigrp', 'EIGRP'),
      ('static', 'STATIC'),
      )

OSPF_AUTH_TYPES = (
      ('null', 'Null'),
      ('simple', 'Simple'),
      ('crypt', 'Crypt'),
      )

PREFIX_TYPES = (
      ("none", "None"),
      ("wan", "WAN"),
      ("nan", "NAN"),
      )

def GetPrefixLength():
   retval = []
   start = 12
   for ix in xrange(30):
      retval.append((start, "%d" %start))
      start += 4

   return retval
